#pragma once

#include <OgreCamera.h>

class CameraShaker {
private:
	Ogre::Real xBaseAmplitude;
	Ogre::Real yBaseAmplitude;
	Ogre::Real xMFrequency;
	Ogre::Real yMFrequency;
	Ogre::Real timePassed;
	Ogre::Real animationTime;
	Ogre::Camera * mCamera;
	Ogre::Real timeToWait;
	bool started;

public:
	CameraShaker(Ogre::Camera * camera, Ogre::Real xBaseAmplitude, Ogre::Real yBaseAmplitude,Ogre::Real xFrequency, Ogre::Real yFrequency, Ogre::Real animTime);
	virtual ~CameraShaker(void);

	void shakeCamera(Ogre::Real timeElapsed);
	void startCameraShake(Ogre::Real timeToWait);
	bool isActive();
	Ogre::Real interpolate(Ogre::Real time,Ogre::Real value);
};